import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    // type 1普通用户 2管理员 3超级管理员
    type: window.sessionStorage.getItem("type")
  },
  mutations: {
    setUserInfos(state) {
      state.type = window.sessionStorage.getItem("type")
    }
  },
  actions: {
  },
  modules: {
  },
  getters: {
    iftype3(state) {
      if (state.type != 3) {
        return true
      }
      return false
    }
  }
})
